<template>
  <el-container>
    <el-main>
      <div class="enter-container">
        <el-row class="tac">
          <el-col :span="4">
            <el-menu default-active="1" @select="handelSelect">
              <el-menu-item index="1">
                <i class="el-icon-setting" />
                <span slot="title">安全设置</span>
              </el-menu-item>
              <el-menu-item index="2">
                <i class="el-icon-coordinate" />
                <span slot="title">绑定  O J</span>
              </el-menu-item>
            </el-menu>
          </el-col>
          <el-col :span="20">
            <Security v-if="!isSecurity" />
            <BindOJ v-else />
          </el-col>
        </el-row>
      </div>
    </el-main>
  </el-container>
</template>

<script>
import Security from '@/views/Setting/Security'
import BindOJ from '@/views/Setting/BindOJ'

export default {
  name: 'Setting',
  components: { BindOJ, Security },
  data() {
    return {
      isSecurity: false
    }
  },
  methods: {
    handelSelect(index) {
      this.isSecurity = (index !== '1')
    }
  }
}
</script>

<style scoped>

  .enter-container {
    margin-left: auto !important;
    margin-right: auto !important;
    width: 1160px;
    height: auto;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)
  }

  .el-menu-item {
    font-size: 18px !important;
    padding-top: 10px;
    height: 80px;
  }

  .el-menu {
    height: 930px;
  }
</style>
